{extend name="base"/}
{block name="resources"}
<style type="text/css">
</style>
{/block}
{block name="main"}
<div class="layui-form ns-form">
	<div class="layui-form-item">
		<a href="{:url('admin/sysuser/detail',['sys_uid' => $info['buyer_uid']])}">
			<label class="layui-form-label">购买人：</label>
			<div class="layui-input-inline">
				{$info.buyer_name}
			</div>
		</a>
	</div>
	<div class="layui-form-item">
		<a href="{:url('admin/shop/shopdetail?site_id='.$info['site_id'])}">
			<label class="layui-form-label">购买店铺：</label>
			<div class="layui-input-inline">
				{$info.site_name}
			</div>
		</a>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">店铺剩余短信：</label>
		<div class="layui-input-inline">
			{$info.sms_num}
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">店铺到期时间：</label>
		<div class="layui-input-inline">
			{:time_to_date($info.expire_time)}
		</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label">订单类型：</label>
		<div class="layui-input-inline">
			{$info.order_type_name}
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">订单总额：</label>
		<div class="layui-input-inline">
			{$info.order_money}
		</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label">订单状态：</label>
		<div class="layui-input-inline">
			{$info.order_status_name}
		</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label">付款时间：</label>
		<div class="layui-input-inline">
			{$info.pay_time > 0 ?  time_to_date($info.pay_time) : '--'}
		</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label">订单编号：</label>
		<div class="layui-input-inline">
			{$info.order_no}
		</div>
	</div>

	{if $info.type == 'group'}
		<div class="layui-form-item">
			<label class="layui-form-label">套餐名称：</label>
			<div class="layui-input-inline">
				{$info.group_name}
			</div>
		</div>

		<div class="layui-form-item">
			<label class="layui-form-label img-upload-lable">套餐图片：</label>
			<div class="layui-input-block img-upload">
				<input type="hidden" class="layui-input" name="group_image" />
				<div class="upload-img-block icon">
					<div class="upload-img-box">
						<img layer-src src="{:img($info.group_image)}" onerror=src="ADMIN_IMG/default_shop.png" >
					</div>
				</div>
			</div>
		</div>

		<div class="layui-form-item">
			<label class="layui-form-label">套餐时长：</label>
			<div class="layui-input-inline">
				{$info.group_num}{if $info.group_period_unit == 'week'} 周 {elseif $info.group_period_unit == 'month'} 月 {elseif $info.group_period_unit == 'year'} 年 {/if}
			</div>
		</div>

		<div class="layui-form-item distribution-index">
			<label class="layui-form-label">套餐价格：</label>
			<div class="layui-input-block">
				<div class="layui-input-inline">
					{$info.group_period_price}元/{if $info.group_period_unit == 'week'} 周 {elseif $info.group_period_unit == 'month'} 月 {elseif $info.group_period_unit == 'year'} 年 {/if}
				</div>
			</div>
		</div>
	{/if}

	<!-- 短信充值套餐 -->
	{if $info.order_type == 'sms'}
		<div class="layui-form-item">
			<label class="layui-form-label">短信套餐：</label>
			<div class="layui-input-inline">
				{$info.sms_package_name}
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">短信数量：</label>
			<div class="layui-input-inline">
				{$info.sms_package_num}
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">短信价格：</label>
			<div class="layui-input-inline">
				{$info.sms_package_price}
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">短信套餐数量：</label>
			<div class="layui-input-inline">
				{$info.sms_num}
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">短信套餐总价：</label>
			<div class="layui-input-inline">
				{$info.sms_money}
			</div>
		</div>

	{/if}
	<!-- 表单操作 -->
	<div class="ns-form-row">
		<button class="layui-btn layui-btn-primary" onclick="back()">返回</button>
	</div>
</div>

{/block}
{block name="script"}
<script>
	function back() {
		location.href = ns.url("admin/sysorder/lists");
	}
</script>
{/block}